<?
	session_start( );
	if(isset( $_SESSION[ "JO_account_debug" ]) && $_SESSION[ "JO_account_debug" ]) $JO_time = time( );
	include_once( "JO_01_configuration.php"	);
	include_once( "JO_02_function.php"		);
	require('JO_02.function');
	require ('DataProvider/DataProvider.php');
	include 'JO_00_lang.php';
?>



<!doctype HTML public "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

<html><head>

		<title>JukeOn Việt Nam</title>

		<meta http-equiv="content-type" content="text/HTML; charset=UTF-8" />
		 
		<!--//datepicker-->
		<script type="text/javascript" src="JO_JS/jquery.min.js"></script>
		<!--<script type="text/javascript" src="JO_jquery/jquery.maskedinput-1.2.2.min.js"></script>
		<script type="text/javascript" src="JO_jquery/ui.datepicker.js"></script>
		<link rel="stylesheet" type="text/css"	href="JO_jquery/themes/base/jquery.ui.all.css"/>-->
		<script type="text/javascript" src="JO_03_JS.js"></script>
		<link rel="stylesheet"		type="text/css"		href="JO_04_1_CSS.CSS"					/> 
        <link rel="stylesheet"		type="text/css"		href="JO_04_2_CSS.CSS"					/> 
		<link rel="stylesheet"		type="text/css"		href="JO_04_CSS.css"					/> 
        		
         <!--[if IE 8]><link rel="stylesheet" href="JO_63_ie8.css" type="text/css" media="screen" /><![endif]-->
         <!--[if IE 7]><link rel="stylesheet" href="JO_63_ie7.css" type="text/css" media="screen" /><![endif]-->
         <!--[if IE 6]><link rel="stylesheet" href="JO_63_ie6.css" type="text/css" media="screen" /><![endif]-->
         <!--[if IE 5]><link rel="stylesheet" href="JO_63_ie5.css" type="text/css" media="screen" /><![endif]-->
		<link rel="shortcut icon"	type="image/x-icon" href="JO_80_image/JO_01_favicon.ico"	/>
		
		<style type="text/css">
			.ui-widget{font-size:1em;}
			.ui-helper-hidden-accessible{clip:auto;}
		</style>
		<style>
		.demo ul {
		list-style-type: none;
		margin: 0;
		padding: 0;
		margin-bottom: 10px;
		}
		.demo li {
		margin: 5px;
		padding: 5px;
		width: 150px;
		}
</style>
		<? // include_once( "JO_03_JS.php"	); ?>
		<? // include_once( "JO_04_CSS.php"	); ?>

	</head>

	<body>

		<div id="JO">

			<?php

				$JO_MySQL = new mysqli( $JO_DB_host, $JO_DB_user, $JO_DB_password, $JO_DB_database );
				$JO_MySQL -> query( "SET NAMES 'UTF8'" );

				include( "JO_08_head.php" );

				if(file_exists("JO_" .(isset( $_REQUEST[ "JO_unit" ] )?$_REQUEST[ "JO_unit" ]:""). ".php")){
					if      ( $_REQUEST[ "JO_unit"		] ) include( "JO_" . $_REQUEST[ "JO_unit" ] . ".php"	);
				}
				else if	( isset( $_REQUEST[ "JO_favorite" ] ) && $_REQUEST[ "JO_favorite" ] ) include( "JO_13_favorite.php"						);
				else if	( isset( $_REQUEST[ "JO_search" ] ) && $_REQUEST[ "JO_search" ] ) include( "JO_20_search.php"							);
				else if	( isset( $_REQUEST[ "JO_artist" ] ) && $_REQUEST[ "JO_artist" ] ) include( "JO_21_artist.php"							);
				else if	( isset( $_REQUEST[ "JO_album" ] ) && $_REQUEST[ "JO_album" ] ) include( "JO_22_album.php"							);
				else if	( isset( $_REQUEST[ "JO_product" ] ) && $_REQUEST[ "JO_product" ] ) include( "JO_23_product.php"						);
				else if	( isset( $_REQUEST[ "JO_content" ] ) && $_REQUEST[ "JO_content" ] ) include( "JO_24_content.php"						);				
				else if(isset($_REQUEST["SO_unit"]) && $_REQUEST["SO_unit"]=="SMS"){
					include "SO/SO_00_integration.php";
				}
				else if	( isset( $_REQUEST[ "SO_unit" ] ) && $_REQUEST[ "SO_unit" ] ) include( 		"JO_71_SO/SO_00_integration.php"			); // Service Operator
				else if	( isset( $_REQUEST[ "CO_unit" ] ) && $_REQUEST[ "CO_unit" ] ) include( "JO_72_CO/CO_00_integration.php"			); // Content Owner
				else if	( isset( $_REQUEST[ "CP_unit" ] ) && $_REQUEST[ "CP_unit" ]  ) include( "JO_73_CP/CP_00_integration.php"			); // Content Provider
				else									include( "JO_10_index.php"							);
				include( "JO_09_foot.php" );
				$JO_MySQL -> close( );

			?>

		</div>

		<iframe
			id		= 'JO_integration_asynchronous'
			name	= 'JO_integration_asynchronous'
			style	= "
				width:	<?=isset($_SESSION[ "JO_account_debug" ]) ? "100%"	: "0px" ?>;
				height:	<?=isset( $_SESSION[ "JO_account_debug" ]) ? "10%"		: "0px" ?>;
			"
		></iframe>



		<!-- Debug -->

			<?php if( isset( $_SESSION[ "JO_account_debug" ]) ) { ?>

				Process Time = <?= time( ) - $JO_time ?> sec.<br />

				<pre><? print_r( $GLOBALS ); ?></pre>

			<?php } ?>



	</body>

</html>



<script type="text/javascript">

	var _gaq = _gaq || [];
	_gaq.push( [ '_setAccount', 'UA-6524228-6' ] );
	_gaq.push( [ '_trackPageview' ] );

	( function( ) {

		var ga = document.createElement( 'script' ); ga.type = 'text/javascript'; ga.async = true;
		ga.src = ( 'https:' == document.location.protocol ? 'https://ssl' : 'http://www' ) + '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName( 'script' )[ 0 ]; s.parentNode.insertBefore( ga, s );

	} )( );

</script>
<script>
                $().ready(function(){
                    $.ajaxSetup({
                        error:function(x,e){
                            var errormsg="";
                            if(x.status==0){
                                errormsg='Error:\n0 - You are offline!!\n Please Check Your Network.';
                            }else if(x.status==404){
                                errormsg='Error:\n404 - Requested URL not found.';
                            }else if(x.status==500){
                                errormsg='Error:\n500 - Internel Server Error.';
                            }else if(e=='parsererror'){
                                errormsg='Error.\nParsing JSON Request failed.';
                            }else if(e=='timeout'){
                                errormsg='Error:\nRequest Time out.';
                            }else {
                                errormsg='Error:\nUnknow Error.\n'+x.responseText;
                            }
                            if($('#JO_ajax_error').length){
                                $('#JO_ajax_error').html(errormsg);
                            }else{
                                alert(errormsg);
                            }
                        }
                    });
                });
            </script>

<?

	////
	///
	//	Log

		// Use the basic log function of PHP, first.

?>
